#ifndef __THREAD_H_
#define __THREAD_H_

#include <thread>

namespace Util
{
	class Thread
	{
	public:
		void start()
		{
			_worker_thread = std::thread(worker_callback, this);
		}

		virtual void run()
		{

		}

		void join()
		{
			if (_worker_thread.joinable())
				_worker_thread.join();
		}

		static void worker_callback(Thread* root)
		{
			root->run();
		}
	private:
		std::thread		_worker_thread;
	};
}

#endif //__THREAD_H_